﻿@page "/employeedetail/{EmployeeId}"
@inherits EmployeeDetailBase


<h1>Detail for @Employee.Name</h1>
<h1>单向绑定：</h1>
<div>
    <h2>@Employee.Name</h2>
    <h2>@Employee.BirthDate</h2>
    <h2>@Employee.Gender</h2>
</div>

<div>
    <h2>@Employee.Name</h2>
    <h2>@Employee.BirthDate</h2>
    <h2>@Employee.Gender</h2>
</div>

<hr />

<h1>双向绑定</h1>

<div>
    <h3>Employee name:</h3>
    <input @bind="@Employee.Name" />
    <h3>Employee Birthday:</h3>
    <input @bind="@Employee.BirthDate" />
    <h3>Employee Gender:</h3>
    <input @bind="@Employee.Gender" />
</div>

<h2>不同的触发event:</h2>
<div>
    <h3>Employee name:</h3>
    <input @bind="@Employee.Name" @bind:event="oninput" />
    <h3>Employee Birthday:</h3>
    <input @bind="@Employee.BirthDate" @bind:event="oninput" />
    <h3>Employee Gender:</h3>
    <input @bind="@Employee.Gender" @bind:event="oninput" />
</div>

<div>
    <button @onclick="Button_Click">Click</button>
</div>

@*<h3>EmployeeDetail</h3>

<div>
    <div>@Employee.Id</div>
    <div>@Employee.DepartmentId</div>
    <div>@Employee.Name</div>
    <div>@Employee.BirthDate</div>
    <div>@Employee.Gender</div>
</div>*@